import pandas as pd
import matplotlib.pyplot as plt
import geopandas as gpd
from folium import plugins
import folium


pd.set_option('display.float_format', lambda x: '%0.4f' % x)
/Users/jnapolitano/venvs/sphinx-build/lib/python3.9/site-packages/geopandas/_compat.py:111: UserWarning: The Shapely GEOS version (3.10.2-CAPI-1.16.0) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.
  warnings.warn(

US Power Plants Meta Analysis

US Power Plants Data

gisfilepath = "/Users/jnapolitano/Projects/gas.jnapolitano.io/source/data/Power_Plants.geojson"

powerplants_df = gpd.read_file(gisfilepath)
#Selecting only Operational Plants
powerplants_df=powerplants_df.loc[powerplants_df['STATUS'] == 'OP'].copy()

#powerplants_df = powerplants_df.to_crs(epsg=3857)

powerplants_df
OBJECTID PLANT_CODE NAME ADDRESS CITY STATE ZIP TELEPHONE TYPE STATUS ... NGAS_USED OIL_USED NET_GEN CAP_FACTOR SUB_1 SUB_2 LINES SOURCE_LAT SOURC_LONG geometry
0 1 10504 AMALGAMATED SUGAR TWIN FALLS 2320 ORCHARD DRIVE EAST TWIN FALLS ID 83301 NOT AVAILABLE CONVENTIONAL STEAM COAL OP ... 1281711 0 51971.0000 0.6980 NOT AVAILABLE NOT AVAILABLE 0 42.5325 -114.4320 POINT (-114.43202 42.53255)
2 3 7458 RUEDI 14151 FRYING PAN ROAD ASPEN CO 81611 NOT AVAILABLE CONVENTIONAL HYDROELECTRIC OP ... 0 0 22690.0000 0.5756 NOT AVAILABLE NOT AVAILABLE 0 39.3631 -106.8219 POINT (-106.82194 39.36311)
3 4 6204 LARAMIE RIVER STATION HWY 320 WHEATLAND WY 82201 NOT AVAILABLE CONVENTIONAL STEAM COAL OP ... 0 37956 10282950.0000 0.6865 LARAMIE RIVER NOT AVAILABLE 3 42.1091 -104.8839 POINT (-104.88388 42.10906)
4 5 8028 ARVADA HWY 14 ARVADA WY 82831 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 2492 0 165.0000 0.0013 UNKNOWN204352 NOT AVAILABLE 1 44.6938 -105.9777 POINT (-105.97772 44.69378)
5 6 8026 HARTZOG HWY 50 WRIGHT WY 82732 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 6018 0 370.0000 0.0028 UNKNOWN201474 NOT AVAILABLE 1 43.7734 -105.7808 POINT (-105.78081 43.77335)
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11805 11806 60487 RIVER ROAD SOLAR, LLC 951 RIVER ROAD COFIELD NC 27922 NOT AVAILABLE SOLAR PHOTOVOLTAIC OP ... 0 0 7833.0000 0.1788 NOT AVAILABLE NOT AVAILABLE 0 36.3510 -76.8420 POINT (-76.86189 36.36233)
11806 11807 2720 BUCK 1555 DUKEVILLE RD SALISBURY NC 28145 (704) 382-4327 CONVENTIONAL STEAM COAL; NATURAL GAS FIRED COM... OP ... 35735577 0 5173061.0000 0.8840 UNKNOWN114701 TAP169920 1 35.7133 -80.3767 POINT (-80.37562 35.70790)
11807 11808 56587 MINNESOTA BREEZE LLC 28431 KING AVENUE RUSHMORE MN 56168 NOT AVAILABLE ONSHORE WIND TURBINE OP ... 0 0 2892.0000 0.2540 NOT AVAILABLE NOT AVAILABLE 0 43.5833 -95.7781 POINT (-95.77810 43.58330)
11808 11809 62139 HUNEKE II CSG 45000 145TH AVENUE ZUMBROTA MN 55992 NOT AVAILABLE SOLAR PHOTOVOLTAIC OP ... 0 0 288.0000 0.0299 NOT AVAILABLE NOT AVAILABLE 0 44.2972 -92.7415 POINT (-92.73593 44.29588)
11809 11810 60834 HWY 14 HOLDCO SOLAR CSG 7647 COUNTRY CLUB ROAD W BYRON BYRON MN 55920 NOT AVAILABLE SOLAR PHOTOVOLTAIC OP ... 0 0 7943.0000 0.1813 NOT AVAILABLE NOT AVAILABLE 0 44.0218 -92.5922 POINT (-92.59275 44.02356)

8736 rows × 45 columns

US Power Plants Interactive Map

operational_powerplants_map = powerplants_df.explore(column="PRIM_FUEL", # make choropleth based on "BoroName" column
     popup=False, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'EqualInterval',
     k = 5
)
#ng_map
operational_powerplants_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Natural Gas Plants

Identifying the Natural Gas Plants in the Dataset

ng_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'NG'].copy()
ng_plants
OBJECTID PLANT_CODE NAME ADDRESS CITY STATE ZIP TELEPHONE TYPE STATUS ... NGAS_USED OIL_USED NET_GEN CAP_FACTOR SUB_1 SUB_2 LINES SOURCE_LAT SOURC_LONG geometry
4 5 8028 ARVADA HWY 14 ARVADA WY 82831 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 2492 0 165.0000 0.0013 UNKNOWN204352 NOT AVAILABLE 1 44.6938 -105.9777 POINT (-105.97772 44.69378)
5 6 8026 HARTZOG HWY 50 WRIGHT WY 82732 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 6018 0 370.0000 0.0028 UNKNOWN201474 NOT AVAILABLE 1 43.7734 -105.7808 POINT (-105.78081 43.77335)
6 7 8030 BARBER CREEK INTERSTATE 90 GILLETTE WY 82718 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 2024 0 124.0000 0.0009 UNKNOWN201475 NOT AVAILABLE 1 44.1683 -105.8914 POINT (-105.89142 44.16833)
7 8 56606 CULBERTSON GENERATION STATION HWY 16 CULBERTSON MT 59218 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 1033610 0 95987.0000 0.1207 UNKNOWN204459 NOT AVAILABLE 1 48.2102 -104.3918 POINT (-104.39180 48.21018)
8 9 55866 BASIN CREEK PLANT 500 NILS DRIVE BUTTE MT 59701 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE OP ... 845257 0 92242.0000 0.1950 UNKNOWN204463 NOT AVAILABLE 1 45.9298 -112.5249 POINT (-112.52486 45.92976)
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11769 11770 961 SOUTH MAIN STREET 1015 CARON RD ROCHELLE IL 61068 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE; NATURA... OP ... 0 2492 1458.0000 0.0116 NOT AVAILABLE NOT AVAILABLE 0 41.9092 -89.0504 POINT (-89.05065 41.90949)
11794 11795 1258 ANTHONY 71D SW 20TH RD ANTHONY KS 67003 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE OP ... 2283 63 165.0000 0.0017 NOT AVAILABLE NOT AVAILABLE 0 37.1517 -98.0311 POINT (-98.03110 37.15153)
11800 11801 59726 CML&P GENERATING FACILITY NO. 2 2601 N. 5TH INDUSTRIAL STREET COFFEYVILLE KS 67337 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE OP ... 502802 0 57987.0000 0.1180 NOT AVAILABLE NOT AVAILABLE 0 37.0930 -95.5852 POINT (-95.58515 37.09298)
11803 11804 57884 LAKE CHARLES POLYMERS 4101 HIGHWAY 108 S WESTLAKE LA 70669 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE; NATURAL ... OP ... 1520931 0 141588.0000 0.5671 UNKNOWN116328 NOT AVAILABLE 1 30.1966 -93.3220 POINT (-93.32196 30.19664)
11806 11807 2720 BUCK 1555 DUKEVILLE RD SALISBURY NC 28145 (704) 382-4327 CONVENTIONAL STEAM COAL; NATURAL GAS FIRED COM... OP ... 35735577 0 5173061.0000 0.8840 UNKNOWN114701 TAP169920 1 35.7133 -80.3767 POINT (-80.37562 35.70790)

1636 rows × 45 columns

Modifying Unit Scale for Map Legend

ng_plants['NGAS_USED']=ng_plants['NGAS_USED'].apply(lambda x: x/1)
ng_plants.rename(columns = {'NGAS_USED':'NGAS_BTUs'}, inplace = True)
ng_plants
OBJECTID PLANT_CODE NAME ADDRESS CITY STATE ZIP TELEPHONE TYPE STATUS ... NGAS_BTUs OIL_USED NET_GEN CAP_FACTOR SUB_1 SUB_2 LINES SOURCE_LAT SOURC_LONG geometry
4 5 8028 ARVADA HWY 14 ARVADA WY 82831 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 2492.0000 0 165.0000 0.0013 UNKNOWN204352 NOT AVAILABLE 1 44.6938 -105.9777 POINT (-105.97772 44.69378)
5 6 8026 HARTZOG HWY 50 WRIGHT WY 82732 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 6018.0000 0 370.0000 0.0028 UNKNOWN201474 NOT AVAILABLE 1 43.7734 -105.7808 POINT (-105.78081 43.77335)
6 7 8030 BARBER CREEK INTERSTATE 90 GILLETTE WY 82718 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 2024.0000 0 124.0000 0.0009 UNKNOWN201475 NOT AVAILABLE 1 44.1683 -105.8914 POINT (-105.89142 44.16833)
7 8 56606 CULBERTSON GENERATION STATION HWY 16 CULBERTSON MT 59218 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE OP ... 1033610.0000 0 95987.0000 0.1207 UNKNOWN204459 NOT AVAILABLE 1 48.2102 -104.3918 POINT (-104.39180 48.21018)
8 9 55866 BASIN CREEK PLANT 500 NILS DRIVE BUTTE MT 59701 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE OP ... 845257.0000 0 92242.0000 0.1950 UNKNOWN204463 NOT AVAILABLE 1 45.9298 -112.5249 POINT (-112.52486 45.92976)
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11769 11770 961 SOUTH MAIN STREET 1015 CARON RD ROCHELLE IL 61068 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE; NATURA... OP ... 0.0000 2492 1458.0000 0.0116 NOT AVAILABLE NOT AVAILABLE 0 41.9092 -89.0504 POINT (-89.05065 41.90949)
11794 11795 1258 ANTHONY 71D SW 20TH RD ANTHONY KS 67003 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE OP ... 2283.0000 63 165.0000 0.0017 NOT AVAILABLE NOT AVAILABLE 0 37.1517 -98.0311 POINT (-98.03110 37.15153)
11800 11801 59726 CML&P GENERATING FACILITY NO. 2 2601 N. 5TH INDUSTRIAL STREET COFFEYVILLE KS 67337 NOT AVAILABLE NATURAL GAS INTERNAL COMBUSTION ENGINE OP ... 502802.0000 0 57987.0000 0.1180 NOT AVAILABLE NOT AVAILABLE 0 37.0930 -95.5852 POINT (-95.58515 37.09298)
11803 11804 57884 LAKE CHARLES POLYMERS 4101 HIGHWAY 108 S WESTLAKE LA 70669 NOT AVAILABLE NATURAL GAS FIRED COMBUSTION TURBINE; NATURAL ... OP ... 1520931.0000 0 141588.0000 0.5671 UNKNOWN116328 NOT AVAILABLE 1 30.1966 -93.3220 POINT (-93.32196 30.19664)
11806 11807 2720 BUCK 1555 DUKEVILLE RD SALISBURY NC 28145 (704) 382-4327 CONVENTIONAL STEAM COAL; NATURAL GAS FIRED COM... OP ... 35735577.0000 0 5173061.0000 0.8840 UNKNOWN114701 TAP169920 1 35.7133 -80.3767 POINT (-80.37562 35.70790)

1636 rows × 45 columns

Natural Gas Plants Interactive Map

ng_map = ng_plants.explore(column="NGAS_BTUs", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'EqualInterval',
     k = 5

)
ng_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Natural Gas Plant Density Interactive Map

heat_data = [[point.xy[1][0], point.xy[0][0]] for point in ng_plants.geometry ]

mapTest = folium.Map(location = [30, -90], tiles='Cartodb dark_matter', zoom_start = 4)

test = plugins.HeatMap(data = heat_data, show=True)
test.add_to(mapTest)

mapTest
Make this Notebook Trusted to load map: File -> Trust Notebook

Coal Plants

Identifying the Coal Plants in the Dataset

#powerplants_df.PRIM_FUEL.unique()
#RC,WC,NUC
#Selecting only Operational Plants
#powerplants_df=powerplants_df.loc[powerplants_df['STATUS'] == 'OP'].copy()

#selecting coal plants
wc_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'WC'].copy()
rc_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'RC'].copy()

#concatenating coal type dfs into one
coal_df = pd.concat([wc_plants,rc_plants])
coal_df.columns
Index(['OBJECTID', 'PLANT_CODE', 'NAME', 'ADDRESS', 'CITY', 'STATE', 'ZIP',
       'TELEPHONE', 'TYPE', 'STATUS', 'COUNTY', 'COUNTYFIPS', 'COUNTRY',
       'LATITUDE', 'LONGITUDE', 'NAICS_CODE', 'NAICS_DESC', 'SOURCE',
       'SOURCEDATE', 'VAL_METHOD', 'VAL_DATE', 'WEBSITE', 'OPERATOR',
       'OPERAT_ID', 'OPER_CAP', 'SUMMER_CAP', 'WINTER_CAP', 'PLAN_CAP',
       'RETIRE_CAP', 'GEN_UNITS', 'PLAN_UNIT', 'RETIR_UNIT', 'PRIM_FUEL',
       'SEC_FUEL', 'COAL_USED', 'NGAS_USED', 'OIL_USED', 'NET_GEN',
       'CAP_FACTOR', 'SUB_1', 'SUB_2', 'LINES', 'SOURCE_LAT', 'SOURC_LONG',
       'geometry'],
      dtype='object')

Coal Plants Interactive Map

coal_map = coal_df.explore(column="NET_GEN", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'EqualInterval',
     k = 5

)
coal_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Coal Plant Density Interactive Map

coal_heat_data = [[point.xy[1][0], point.xy[0][0]] for point in coal_df.geometry ]
#

coal_density_map = folium.Map(location = [30, -90], tiles='Cartodb dark_matter', zoom_start = 4)

coal_heat_layer = plugins.HeatMap(data = coal_heat_data, show=True)
coal_heat_layer.add_to(coal_density_map)

coal_density_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Solar Plants

Identifying the Solar Plants in the Dataset

#powerplants_df.PRIM_FUEL.unique()
#RC,WC,NUC
#Selecting only Operational Plants
#powerplants_df=powerplants_df.loc[powerplants_df['STATUS'] == 'OP'].copy()

#selecting coal plants
solar_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'SUN'].copy()

#concatenating coal type dfs into one
solar_plants.columns
Index(['OBJECTID', 'PLANT_CODE', 'NAME', 'ADDRESS', 'CITY', 'STATE', 'ZIP',
       'TELEPHONE', 'TYPE', 'STATUS', 'COUNTY', 'COUNTYFIPS', 'COUNTRY',
       'LATITUDE', 'LONGITUDE', 'NAICS_CODE', 'NAICS_DESC', 'SOURCE',
       'SOURCEDATE', 'VAL_METHOD', 'VAL_DATE', 'WEBSITE', 'OPERATOR',
       'OPERAT_ID', 'OPER_CAP', 'SUMMER_CAP', 'WINTER_CAP', 'PLAN_CAP',
       'RETIRE_CAP', 'GEN_UNITS', 'PLAN_UNIT', 'RETIR_UNIT', 'PRIM_FUEL',
       'SEC_FUEL', 'COAL_USED', 'NGAS_USED', 'OIL_USED', 'NET_GEN',
       'CAP_FACTOR', 'SUB_1', 'SUB_2', 'LINES', 'SOURCE_LAT', 'SOURC_LONG',
       'geometry'],
      dtype='object')

Solar Plants Interactive Map

solar_map = solar_plants.explore(column="NET_GEN", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'EqualInterval',
     k = 5

)
solar_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Solar Plant Density Interactive Map

solar_heat_data = [[point.xy[1][0], point.xy[0][0]] for point in solar_plants.geometry ]
#

solar_density_map = folium.Map(location = [30, -90], tiles='Cartodb dark_matter', zoom_start = 4)

solar_heat_layer = plugins.HeatMap(data = solar_heat_data, show=True)
solar_heat_layer.add_to(solar_density_map)

solar_density_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Wind Plants

Identifying the Coal Plants in the Dataset

#powerplants_df.PRIM_FUEL.unique()
#RC,WC,NUC
#Selecting only Operational Plants
#powerplants_df=powerplants_df.loc[powerplants_df['STATUS'] == 'OP'].copy()

#selecting coal plants
wind_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'WND'].copy()

#concatenating coal type dfs into one
wind_plants.columns
Index(['OBJECTID', 'PLANT_CODE', 'NAME', 'ADDRESS', 'CITY', 'STATE', 'ZIP',
       'TELEPHONE', 'TYPE', 'STATUS', 'COUNTY', 'COUNTYFIPS', 'COUNTRY',
       'LATITUDE', 'LONGITUDE', 'NAICS_CODE', 'NAICS_DESC', 'SOURCE',
       'SOURCEDATE', 'VAL_METHOD', 'VAL_DATE', 'WEBSITE', 'OPERATOR',
       'OPERAT_ID', 'OPER_CAP', 'SUMMER_CAP', 'WINTER_CAP', 'PLAN_CAP',
       'RETIRE_CAP', 'GEN_UNITS', 'PLAN_UNIT', 'RETIR_UNIT', 'PRIM_FUEL',
       'SEC_FUEL', 'COAL_USED', 'NGAS_USED', 'OIL_USED', 'NET_GEN',
       'CAP_FACTOR', 'SUB_1', 'SUB_2', 'LINES', 'SOURCE_LAT', 'SOURC_LONG',
       'geometry'],
      dtype='object')

Wind Plants Interactive Map

wind_map = wind_plants.explore(column="NET_GEN", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'EqualInterval',
     k = 5

)
wind_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Wind Plant Density Interactive Map

wind_heat_data = [[point.xy[1][0], point.xy[0][0]] for point in wind_plants.geometry ]
#

wind_density_map = folium.Map(location = [30, -90], tiles='Cartodb dark_matter', zoom_start = 4)

wind_heat_layer = plugins.HeatMap(data = wind_heat_data)
wind_heat_layer.add_to(wind_density_map)

wind_density_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Hydro Plants

Identifying the Hydro Plants in the Dataset

#powerplants_df.PRIM_FUEL.unique()
#RC,WC,NUC
#Selecting only Operational Plants
#powerplants_df=powerplants_df.loc[powerplants_df['STATUS'] == 'OP'].copy()

#selecting coal plants
hydro_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'WAT'].copy()

#concatenating coal type dfs into one
hydro_plants.columns
Index(['OBJECTID', 'PLANT_CODE', 'NAME', 'ADDRESS', 'CITY', 'STATE', 'ZIP',
       'TELEPHONE', 'TYPE', 'STATUS', 'COUNTY', 'COUNTYFIPS', 'COUNTRY',
       'LATITUDE', 'LONGITUDE', 'NAICS_CODE', 'NAICS_DESC', 'SOURCE',
       'SOURCEDATE', 'VAL_METHOD', 'VAL_DATE', 'WEBSITE', 'OPERATOR',
       'OPERAT_ID', 'OPER_CAP', 'SUMMER_CAP', 'WINTER_CAP', 'PLAN_CAP',
       'RETIRE_CAP', 'GEN_UNITS', 'PLAN_UNIT', 'RETIR_UNIT', 'PRIM_FUEL',
       'SEC_FUEL', 'COAL_USED', 'NGAS_USED', 'OIL_USED', 'NET_GEN',
       'CAP_FACTOR', 'SUB_1', 'SUB_2', 'LINES', 'SOURCE_LAT', 'SOURC_LONG',
       'geometry'],
      dtype='object')

Hydro Plants Interactive Map

hydro_map = hydro_plants.explore(column="NET_GEN", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'Percentiles',
     k = 5

)
hydro_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Hydro Plant Density Interactive Map

hydro_heat_data = [[point.xy[1][0], point.xy[0][0]] for point in hydro_plants.geometry ]
#

hydro_density_map = folium.Map(location = [30, -90], tiles='Cartodb dark_matter', zoom_start = 4)

hydro_heat_layer = plugins.HeatMap(data = hydro_heat_data, show=True)
hydro_heat_layer.add_to(hydro_density_map)

hydro_density_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Nuclear Plants

Identifying the Nuclear Plants in the Dataset

#powerplants_df.PRIM_FUEL.unique()
#RC,WC,NUC
#Selecting only Operational Plants
#powerplants_df=powerplants_df.loc[powerplants_df['STATUS'] == 'OP'].copy()

#selecting coal plants
nuclear_plants = powerplants_df.loc[powerplants_df['PRIM_FUEL'] == 'NUC'].copy()

#concatenating coal type dfs into one
nuclear_plants.columns
Index(['OBJECTID', 'PLANT_CODE', 'NAME', 'ADDRESS', 'CITY', 'STATE', 'ZIP',
       'TELEPHONE', 'TYPE', 'STATUS', 'COUNTY', 'COUNTYFIPS', 'COUNTRY',
       'LATITUDE', 'LONGITUDE', 'NAICS_CODE', 'NAICS_DESC', 'SOURCE',
       'SOURCEDATE', 'VAL_METHOD', 'VAL_DATE', 'WEBSITE', 'OPERATOR',
       'OPERAT_ID', 'OPER_CAP', 'SUMMER_CAP', 'WINTER_CAP', 'PLAN_CAP',
       'RETIRE_CAP', 'GEN_UNITS', 'PLAN_UNIT', 'RETIR_UNIT', 'PRIM_FUEL',
       'SEC_FUEL', 'COAL_USED', 'NGAS_USED', 'OIL_USED', 'NET_GEN',
       'CAP_FACTOR', 'SUB_1', 'SUB_2', 'LINES', 'SOURCE_LAT', 'SOURC_LONG',
       'geometry'],
      dtype='object')

Nuclear Plants Interactive Map

nuclear_map = nuclear_plants.explore(column="NET_GEN", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="Set1", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black"),
     marker_kwds= dict(radius=6),# use black outline)
     scheme = 'EqualInterval',
     k = 5

)
nuclear_map
Make this Notebook Trusted to load map: File -> Trust Notebook

Nuclear Plant Density Interactive Map

nuclear_heat_data = [[point.xy[1][0], point.xy[0][0]] for point in solar_plants.geometry ]
#

nuclear_density_map = folium.Map(location = [30, -90], tiles='Cartodb dark_matter', zoom_start = 4)

nuclear_heat_layer = plugins.HeatMap(data = nuclear_heat_data, show=True)
nuclear_heat_layer.add_to(nuclear_density_map)

nuclear_density_map
Make this Notebook Trusted to load map: File -> Trust Notebook